package com.tianfeng.huayi.util;

import java.util.Random;

public class CaptchaGenerator {

    // 生成6位数字验证码
    public static String generateCaptcha() {
        Random random = new Random();
        StringBuilder captcha = new StringBuilder();
        for (int i = 0; i < 6; i++) {
            int digit = random.nextInt(10); // 生成0-9之间的随机数字
            captcha.append(digit);
        }
        return captcha.toString();
    }
}